import request from '@/utils/request'

// 查询待办列表
export function listDbinfo(query) {
  return request({
    url: '/sl/dbinfo/list',
    method: 'get',
    params: query
  })
}

// 查询待办详细
export function getDbinfo(dbId) {
  return request({
    url: '/sl/dbinfo/' + dbId,
    method: 'get'
  })
}

// 新增待办
export function addDbinfo(data) {
  return request({
    url: '/sl/dbinfo',
    method: 'post',
    data: data
  })
}

// 修改待办
export function updateDbinfo(data) {
  return request({
    url: '/sl/dbinfo',
    method: 'put',
    data: data
  })
}

// 删除待办
export function delDbinfo(dbId) {
  return request({
    url: '/sl/dbinfo/' + dbId,
    method: 'delete'
  })
}

// 完结待办
export function doneDbinfo(dbId) {
  return request({
    url: '/sl/dbinfo/done/' + dbId,
    method: 'get',
  })
}

//领导审核通过
export function approvedDbinfo(dbId) {
  return request({
    url: '/sl/dbinfo/bg/'+dbId,
    method: 'get',
  })
}

//复核人审核通过
export function checkPassDbinfo(dbId) {
  return request({
    url: '/sl/dbinfo/check/'+dbId,
    method: 'get',
  })
}